function [prediction,confidence ] = gpr_wo_noise(kernel_handle,training_data,test_data,class)
%GPR_WO_NOISE - implemetns a gpr assuming no noise in o/p variable.
%   Detailed explanation goes here

mx = mean(training_data(:,6:end),1);
sx = var(training_data(:,6:end));
%sx = max(whole_data);


training_data(:,6:end) = bsxfun(@minus, training_data(:,6:end), mx);
training_data(:,6:end) = bsxfun(@rdivide, training_data(:,6:end), sx);
training_data(:,end) = 0;
test_data(:,6:end) = bsxfun(@minus, test_data(:,6:end), mx);
test_data(:,6:end) = bsxfun(@rdivide, test_data(:,6:end), sx);
test_data(:,end) = 0;

y = 10*(training_data(:,5) == class);
y(y==0) = -10;
%known_negative_features = data(nc_data(nc_ind),6:end);

feature_cov = kernel_handle(training_data(:,6:end),training_data(:,6:end));
feature_inv_output = (feature_cov\y);


prediction = zeros(size(test_data,1),1);
confidence = zeros(size(test_data,1),1);


for i=1:size(test_data,1)
    i
    kxt_xd = kernel_handle(test_data(i,6:end),training_data(:,6:end));
    mean_value = kxt_xd*feature_inv_output;
    %cov = kernel_handle(data(i,6:end),data(i,6:end)) - kxt_xd*(feature_cov\kxt_xd');
    prediction(i) = (mean_value>0);
    confidence(i) = 1;
end

end




